package com.mhtool.core.collection;

import lombok.experimental.UtilityClass;

import java.util.HashMap;
import java.util.Map;

/**
 * @author yin
 * @date 2022/1/24 14:04
 * @since 3.8.0
 */
@UtilityClass
public class MapUtils {
    public static Map<String, Object> newHashMap(int initialCapacity) {
        return new HashMap<>(initialCapacity);
    }

    public static Map<String, Object> newHashMap(String key, Object value) {
        Map<String, Object> map = newHashMap(1);
        map.put(key, value);
        return map;
    }
}
